import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service
//物资消耗
const request = {
    //根据条件分页查询物资消耗
    consumptionMaterials (params) {
        return httpPost({
            url: '/material/consume/listByEntity',
            params
        })
    },
    //新增物资消耗
    AddConsumptionMaterials (params) {
        return httpPost({
            url: '/material/consume/create',
            params
        })
    },
    //修改物资消耗
    EditConsumptionMaterials (params) {
        return httpPost({
            url: '/material/consume/update',
            params
        })
    },
    //更新设备明细信息
    saveEquipDtls (params) {
        return httpPost({
            url: '/material/consume/updateEquipDtls',
            params
        })
    },
    //修改原物资明细
    updatematerialsList (params) {
        return httpPost({
            url: '/material/consume/updatematerialsList',
            params
        })
    },
    //修改成品物资明细
    updateFinishedGoodsList (params) {
        return httpPost({
            url: '/material/consume/updateFinishedGoodsList',
            params
        })
    },
    // 冲红单
    redSingle (billId) {
        return httpGet({
            url: '/material/consume/initRedBill',
            params: {
                billId
            }
        })
    },
    //获取物资成本单价
    getMaterialCostUnitPrice (params) {
        return httpPost({
            url: '/material/monthlySettlement/listMaterialCostUnitPrice',
            params
        })
    },
}

export default request